package com.adjaisd.scarecrow.service;

import com.adjaisd.scarecrow.entity.Device;
import com.adjaisd.scarecrow.vo.Pager;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author adjaisd
 * @since 2022-03-10
 */
public interface DeviceService extends IService<Device> {

    List<Device> getAllDevice();

    Device getDeviceByID(Long deviceId);

    Device getDeviceByNumber(Long number);

    Device getDeviceByNumberUID(Long number, Long userId);

    List<Device> getDeviceListByUID(Long userId);

    Boolean addDevice(Device device);

    Boolean delDevice(Long userId, Long number);

    Boolean existAllDeviceId(Long userId, String deviceIdList);

    // 根据用户ID，指标名与单位获取设备分页
    Pager<Device> getDeviceByQuota(long userId, String quotaName, String unit, long page, long pageSize);

}
